public  class AccountExtensionContoller {

    private List<string> sFieldsToActivate;

    public List<string> accountFields{get;set;}

    
    public Account accnt {get; set;}
    
    
    public String RecType{get;set;}
    private ApexPages.StandardController accntController;
    
    private void setAllFieldsActive(){
        
        sFieldsToActivate = new List<string>();         
        Schema.DescribeSObjectResult solobj = Account.SObjectType.getDescribe(); 
        Map<String, Schema.SObjectField> allFieldsMap = solobj.fields.getMap();

        for(String fldName : allFieldsMap.keySet()){
            Schema.SObjectField fld = allFieldsMap.get(fldName);
            DescribeFieldResult fieldResult = fld.getDescribe();
            if(fieldResult.isCustom()){
                
                    string fieldName = fieldResult.getName();
                    sFieldsToActivate.add(fieldName);
            }
        }        
    }

	public AccountExtensionContoller(ApexPages.StandardController stdController) {        
        
        setAllFieldsActive();
        stdController.addFields(sFieldsToActivate);
        accntController = stdController;
        accnt = (Account)stdController.getRecord();

    }
    
    public void Initialise(){
    	
    	
    	RetrieveLayout retLay = new RetrieveLayout('Account','' );		
		retLay.Initialise();
		accountFields = retLay.LayoutFields;
		for(string val: accountFields){
		System.debug('Value in Array: ' + val);
		
		}
    }
}